Skip to content

ci: 在 Linux CI 中加入命令行自动化测试 - #45

Merged
donghaiwang merged 1 commit into
OpenHUTB:hutbfrom
Dame-time-0034:ci/automation-tests-clean
Nov 7, 2026
Merged

donghaiwang merged 1 commit into
OpenHUTB:hutbfrom
Dame-time-0034:ci/automation-tests-clean

Conversation

@Dame-time-0034

Copy link
Copy Markdown
Contributor

背景

关联 #11。目标是在 CI 中用命令行运行引擎自动化测试,不依赖编辑器界面。

修改

在现有 .github/workflows/build_self_hosted_linux.yml 的 build 与 install 之间加入三个步骤:

  1. Run automation tests:用 xvfb-run + -nullrhi 启动 Development 版 UE4Editor,以 -ExecCmds="Automation RunTests <filter>" 执行测试,-TESTEXIT 保证测试跑完后进程退出,-ReportExportPath 输出 JSON/HTML 报告
  2. Check automation report:解析 index.json 判定结果(测试失败时编辑器仍返回 0,不能只看退出码)
  3. Upload automation report:上传报告与日志作为 artifact

同时补充两点构建修正:

  • 对 Engine/Source/ThirdParty 下的 Linux 二进制补执行权限(此前 ispc 报 Access denied 导致构建失败)
  • Setup.sh 成功后补写 .ue4dependencies 标记,避免 GenerateProjectFiles.sh 误判依赖未就绪

验证

已在 fork 仓库完整跑通一次 hutb Linux CI/CD,全部步骤 success:

默认测试集可通过 workflow_dispatch 的 test_filter 输入调整。System.Core.Misc 全量会跑到引擎自带的 AsyncIODelete 测试并触发崩溃,因此默认测试集避开了它。

@donghaiwang
donghaiwang merged commit 88aac64 into OpenHUTB:hutb Nov 7, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants